<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <!--<title>广西司法厅智能合同管理后台</title>-->
    <title>北大合同分析管理后台</title>

    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->

    <link rel="shortcut icon" href="favicon.ico">
    <link href="../style/bootstrap.min14ed.css" rel="stylesheet">
    <link href="../style/font-awesome.min93e3.css" rel="stylesheet">
    <link href="../style/animate.min.css" rel="stylesheet">
    <link href="../style/style.min862f.css" rel="stylesheet">
    <script src="../js/env.js"></script>
    <script>
        $("a").attr("href","http://localhost:8000")
    </script>
</head>

<body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close"><i class="fa fa-times-circle"></i>
        </div>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element">
                        <!--<span><img alt="image" class="img-circle" src="img/profile_small.jpg"/></span>-->
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                               <span class="block m-t-xs"><strong class="font-bold">Beaut-zihan</strong></span>
                                <span class="text-muted text-xs block">超级管理员<b class="caret"></b></span>
                                </span>
                        </a>
                    </div>
                    <div class="logo-element">BDYH
                    </div>
                </li>
                <li style="margin-top: 25%">
                    <a class="J_menuItem" href="http://localhost:8000/page/contractList.html"><i class="fa fa-columns"></i> <span class="nav-label">法律法规管理</span></a>
                </li>
                <li>
                    <a class="J_menuItem" href="/page/modelList.html"><i class="fa fa-columns"></i> <span class="nav-label">范本管理</span></a>
                </li>
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i
                        class="fa fa-bars"></i> </a>
                    <form role="search" class="navbar-form-custom" method="post"
                          action="http://www.zi-han.net/theme/hplus/search_results.html">
                        <div class="form-group">
                            <input type="text" value="北大合同分析管理后台" class="form-control" name="top-search"
                                   id="top-search">
                            <!--<input type="text" value="广西司法厅智能合同管理后台" class="form-control" name="top-search"-->
                                   <!--id="top-search">-->
                        </div>
                    </form>
                </div>
            </nav>
        </div>
        <div class="row content-tabs">
            <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs J_menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:;" class="active J_menuTab" data-id="main.html">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
            </button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>

                </button>
                <ul role="menu" class="dropdown-menu dropdown-menu-right">
                    <li class="J_tabShowActive"><a>定位当前选项卡</a>
                    </li>
                    <li class="divider"></li>
                    <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                    </li>
                    <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                    </li>
                </ul>
            </div>
            <a id="doLogout" href="#" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i> 退出</a>
        </div>
        <div class="row J_mainContent" id="content-main">
            <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="http://localhost:8000/page/main.html" frameborder="0"
                    data-id="main.html" seamless></iframe>
        </div>
        <div class="footer">
            <div class="pull-right">&copy; 2018-8-10 <a href="http://pkulaw.com" target="_blank">北大法宝</a>
            </div>
        </div>
    </div>
    <!--右侧部分结束-->
    <!--右侧边栏开始-->


</div>

<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script src="../js/jquery.metisMenu.js"></script>
<script src="../js/jquery.slimscroll.min.js"></script>
<script src="../js/layer.min.js"></script>
<script src="../js/hplus.min.js"></script>
<script type="text/javascript" src="../js/contabs.min.js"></script>
<script src="../js/pace.min.js"></script>
<script>
    $("#doLogout").click(function () {
        $.post(requestUrl+"/doLogout",function () {
            location.href="../login.html";
        })
    });
</script>
<script>
    function addMenuTab(dataUrl, menuName, dataIndex) {
        // 获取标识数据
        var flag = true;
        if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;

        // 选项卡菜单已存在
        $('.J_menuTab').each(function () {
            if ($(this).data('id') == dataUrl) {
                if (!$(this).hasClass('active')) {
                    $(this).addClass('active').siblings('.J_menuTab').removeClass('active');
                    scrollToTab(this);
                    // 显示tab对应的内容区
                    $('.J_mainContent .J_iframe').each(function () {
                        if ($(this).data('id') == dataUrl) {
                            $(this).show().siblings('.J_iframe').hide();
                            return false;
                        }
                    });
                }
                flag = false;
                return false;
            }
        });

        // 选项卡菜单不存在
        if (flag) {
            var str = '<a href="javascript:;" class="active J_menuTab" data-id="' + dataUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
            $('.J_menuTab').removeClass('active');

            // 添加选项卡对应的iframe
            var str1 = '<iframe class="J_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" seamless></iframe>';
            $('.J_mainContent').find('iframe.J_iframe').hide().parents('.J_mainContent').append(str1);

            // 添加选项卡
            $('.J_menuTabs .page-tabs-content').append(str);
            //scrollToTab($('.J_menuTab.active'));
        }
        return false;
    }

    function closeTab(dataid) {
        $(".page-tabs-content").children("[data-id]").not(":first").each(function () {
            $('.J_iframe[data-id="' + dataid + '"]').remove();
            $('.J_menuTab[data-id="' + dataid + '"]').remove();
        });
        $(".page-tabs-content").children("[data-id]:last").each(function () {
            $('.J_iframe[data-id="' + $(this).data("id") + '"]').show();
            $(this).addClass("active");
            if($(this).data("id")=="modelList.html"){
                $('.J_iframe[data-id="' + $(this).data("id") + '"]').remove();
                $('.J_menuTab[data-id="' + $(this).data("id") + '"]').remove();
                addMenuTab("http://localhost:8000/page/modelList.html", "范本管理", "modelList");
                //$("iframe[data-id='modelList.html']")[0].contentWindow().refresh();
            }
        });
        $(".page-tabs-content").css("margin-left", "0")
    }

</script>
</body>

</html>